package com.woniu.customer.service;

import com.woniu.customer.entity.Customer;
import com.woniu.customer.entity.GoodOrder;
import com.woniu.customer.entity.vo.InvestmentVO;
import com.woniu.util.utils.HttpResult;

public interface CustomerService {

    /**
     * 登录
     *
     * @param customer
     * @return
     */
    HttpResult<?> login(Customer customer);

    /**
     * 注册
     *
     * @param customer
     * @return
     */
    HttpResult<?> register(Customer customer);

    /**
     * 通过手机号查找用户
     *
     * @param phone
     * @return
     */
    HttpResult<?> findCustomerByPhone(String phone);

    /**
     * 修改个人资料
     *
     * @param customer
     * @return
     */
    HttpResult<?> updateCustomerinformation(Customer customer);

    /**
     * 用户投资
     */
    HttpResult<?> CustomerInvest(InvestmentVO investment);

    /**
     * 查找所有商品
     * @return
     */
    HttpResult<?> selectGoodList();

    /**
     * 兑换商品，扣减积分
     * @param phone
     * @param grade
     * @return
     */
    HttpResult<?> cutGoodGrade(String phone,Integer grade);

    /**
     * 增加兑换订单记录
     * @param goodOrder
     */
    HttpResult<?> addGoodOrder(GoodOrder goodOrder);

    /**
     * 查询商品兑换记录
     * @param phone
     * @return
     */
    HttpResult<?> selectGoodOrderList(String phone);
}
